package cate.game.train.exp.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "装备心得的请求")
public class ExpOnReq implements MsgInput {
    @NoteField("英雄uid")
    public String heroUid;

    @NoteField("心得tid")
    public int tid;

    @NoteField("位置")
    public byte pos;
    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = game.train.exp.onExp(cc.getRole(), heroUid, tid, pos);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.EXP_ON_REQ;
    }
}
